<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<s:layout-definition>
<html>
<head>
  <title><f:message key="${nadpis}"/></title>
  <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/bootstrap.css" />
  <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/bootstrap-responsive.css" />
  <s:layout-component name="hlavicka"/>
</head>
<body> 
    <div class="navbar navbar">
      <div class="navbar-inner">
        <div class="container-fluid">
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <a class="brand" href="#">PA165 Language School</a>
          <div class="btn-group pull-right">
            <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
              <i class="icon-user"></i><sec:authentication property="principal.username"/>
              <span class="caret"></span>
            </a>
            <ul class="dropdown-menu">
              <li class="divider"></li>
              <li><a href="<c:url value="/j_spring_security_logout" />" ><f:message key="Logout"/></a></li>
            </ul>
          </div>
          <div class="nav-collapse">
            <ul class="nav">
              <li><s:link href="/index.jsp"><f:message key="Home"/></s:link></li>
            </ul>
          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>    
            <div class="container-fluid">
            <div class="row-fluid">
              <div class="span3">
                <div class="well sidebar-nav">
                  <ul class="nav nav-list">
                    <c:choose>
                        <c:when test="${pageContext.request.isUserInRole('ROLE_ADMIN')}" >
                            <li><s:link href="/student/student.jsp"><f:message key="Students"/></s:link></li>
                        </c:when>
                        <c:otherwise>
                            <li><s:link beanclass="com.pa165.languageschoolpresentation.StudentActionBean" event="showLecturesByLogin"><f:message key="MyLectures"/></s:link></li>
                        </c:otherwise>
                    </c:choose>
                    <li><s:link href="/lector/lector.jsp"><f:message key="Lectors"/></s:link></li>
                    <li><s:link href="/course/course.jsp"><f:message key="Courses"/></s:link></li>
                    <li><s:link href="/lecture/lecture.jsp"><f:message key="Lectures"/></s:link></li>
                </ul>
                </div>
              </div>
            <div class="span9">
                <h1><f:message key="${nadpis}"/></h1>
                <div class="hero-unit">                      
                    <s:layout-component name="telo"/>
                </div>
            </div>
                </div>
            </div>
    <script type="text/javascript" src="${pageContext.request.contextPath}/jquery.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/bootstrap.js"></script>
    
</body>
</html>
</s:layout-definition>